<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Draw points with specified color</title>
    <script>
      function fn(n,o){
        console.log(o);
        return{
          fn:function(m) {
            return fn(m,n);
          }
        };
      }
      var c = fn(0).fn(1);
      c.fn(2);
      c.fn(3);
    </script>
  </head>

</html>
